04. Web Services

What is a Web Service?

JAVA C2 L1 02 What Is A Web Service-

A web service is a way to share data between two disparate systems. The communication typically happens between a client and a server.

  • Client - The client makes a request for data.
  • Server - The server responds to the client's request.

Web Service Communication

JAVA C2 L1 03 Web Service Communication

The means of communication between the client and server is via a standard web protocol like HTTP (or HTTPS) on the world wide web, that uses a common language like JSON or XML.

A client invokes a web service by sending an XML (or JSON) message, then waits for a corresponding XML response from the server.

More Examples of Client Applications

QUESTION:

Along with the Uber example in the video, what are some other examples you can think of where client applications are used?

ANSWER:

Thanks for your response! Client applications are not just mobile phone apps, but include plenty of applications you use on your home computer as well.

How Web Services Work

JAVA C2 L1 04 How Web Services Work

How Web Services Work

Step 1: The web service provider (the person who created the web service) defines a standard format for requests and also for the responses provided.

Step 2: The client sends a request to the web service across the network.

Step 3: The web service receives the request and performs an action (like query a database or perform a calculation) and sends a response back to the calling client.

QUIZ QUESTION::

Match the concept to the definition.

ANSWER CHOICES:



Concept

Definition

The system requesting information

The organization or person that created the web service

The system providing the information

SOLUTION:

Concept

Definition

The system requesting information

The organization or person that created the web service

The system providing the information